import 'package:cbec_app/generated/json/base/json_field.dart';
import 'package:cbec_app/generated/json/book_info_item_detail_entity.g.dart';
import 'dart:convert';
export 'package:cbec_app/generated/json/book_info_item_detail_entity.g.dart';

@JsonSerializable()
class BookInfoItemDetailEntity {
  String? id = '';
  String? cid = '';
  String? paySn = '';
  String? sn = '';
  String? expressCode = '';
  dynamic expressCodeList;
  String? expressName = '';
  double? priceExpress;
  int? finalPay = 0;
  int? type = 0;
  int? presaleType = 0;
  dynamic presaleStatus;
  int? finalStatus = 0;
  dynamic presaleStartTime;
  dynamic presaleEndTime;
  int? presalePayReturn = 0;
  String? cd = '';
  String? payTime = '';
  int? shippingType = 0;
  double? priceOrder;
  dynamic pendingPaymentTime;
  dynamic cancelTimestamp;
  int? payType = 0;
  List<BookInfoItemDetailGoodsInfo>? goodsInfo = [];
  BookInfoItemDetailExtra? extra;
  double? priceTotal;
  double? taxFee;
  int? status = 0;
  String? receiveName = '';
  String? receiveMobile = '';
  String? receiveAddress = '';
  String? receiveInfo = '';
  String? buyerMobile = '';
  String? buyerName = '';
  dynamic expressInfo;
  String? cancelReason = '';
  String? userMessage = '';
  double? presalePriceTotal;
  String? bookId = '';
  String? activityId = '';
  int? bookStatus = 0;
  int? people = 0;
  int? newPeople = 0;
  int? needPeople = 0;
  String? ld = '';
  int? ldTimeStamp = 0;
  String? avatar = '';
  int? bookMain = 0;
  List<dynamic>? imgs = [];

  BookInfoItemDetailEntity();

  factory BookInfoItemDetailEntity.fromJson(Map<String, dynamic> json) => $BookInfoItemDetailEntityFromJson(json);

  Map<String, dynamic> toJson() => $BookInfoItemDetailEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class BookInfoItemDetailGoodsInfo {
  String? goodsOrderId = '';
  String? goodsId = '';
  String? orderId = '';
  int? commodityType = 0;
  dynamic commodityForm;
  dynamic paysSn;
  String? goodsName = '';
  String? img = '';
  double? price;
  double? priceActual;
  int? buyNum = 0;
  int? isSend = 0;
  int? returnStatus = 0;
  int? specNum = 0;
  String? unit = '';
  dynamic isComment;
  dynamic returnNumber;
  dynamic priceReturn;
  dynamic commentText;
  dynamic channelStars;
  String? spuSpecBody = '';
  dynamic commentFileList;
  dynamic commentReplyList;

  BookInfoItemDetailGoodsInfo();

  factory BookInfoItemDetailGoodsInfo.fromJson(Map<String, dynamic> json) => $BookInfoItemDetailGoodsInfoFromJson(json);

  Map<String, dynamic> toJson() => $BookInfoItemDetailGoodsInfoToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class BookInfoItemDetailExtra {
  dynamic id;
  double? redPacketMoney;
  double? pointsMoney;
  double? finalPointsMoney;
  double? orderActivityDiscount;
  double? specialDiscount;
  double? fullDiscount;
  double? goodsDiscount;
  double? couponDiscount;
  double? expressCoupon;
  double? storeCoupon;
  double? useBdPayCard;
  double? finalUseBdPayCard;
  double? vipDiscount;
  double? newUserDiscount;
  double? advanceDiscount;

  BookInfoItemDetailExtra();

  factory BookInfoItemDetailExtra.fromJson(Map<String, dynamic> json) => $BookInfoItemDetailExtraFromJson(json);

  Map<String, dynamic> toJson() => $BookInfoItemDetailExtraToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
